package com.zzcon.sckill.web;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zzcon.sckill.entity.User;
import com.zzcon.sckill.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @ApiOperation("测试全部用户")
    @GetMapping("/getAll")
    public List<User> getAll(){
        return userService.selectList(new EntityWrapper<>());
    }

}
